<template>
	<view class="flex align-center" style="height: 50rpx">
		<!-- <u-number-box v-model="value" :index="item.goods_id" :disabled="disabled"
		:disabledInput="true" :min="1" @plus="plus" @minus="minus"></u-number-box> -->
		<view class="u-p-x-20" style="line-height: 50rpx;background-color: #f2f3f5;" @click="minus">
			<u-icon name="minus"></u-icon>
		</view>
		<text class="u-p-x-20 u-m-x-10" style="line-height: 50rpx;background-color: #f2f3f5;">{{num}}</text>
		<view class="u-p-x-20" style="line-height: 50rpx;background-color: #f2f3f5;" @click="plus">
			<u-icon name="plus"></u-icon>
		</view>
	</view>
</template>

<script>
	export default {
		name:"dy-number-box",
    props: {
      item: {
        type: Object,
        default:{}
      },
      disabled: {
        type: Boolean,
        default: false
      },
			num: {
			  type: [Number,String],
			  default: 1
			},
    },
		data() {
			return {
				
			};
		},
    methods: {
      plus() {
				if(this.disabled) return
        this.$emit('plus', this.item)
      },
      minus() {
				if(this.disabled) return
        this.$emit('minus', this.item)
      },
    }
	}
</script>

<style lang="scss" scoped>

</style>
